﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skeleton.Crud
{
    /// <summary>
    /// An interface which is used to lookup property data which have the Key attribute attached to.
    /// All the lookups are cached when called for the first time.
    /// </summary>
    /// TODO: Implement a method which returns an expression so the result can be used in linq queries.
    public interface IEntityKeyCache
    {
        /// <summary>
        /// Get the value of the Key property
        /// </summary>
        /// <param name="entity">The entity to find the property with the Key attribute on.</param>
        /// <returns>Value of the Key property.</returns>
        object GetKey(object entity);
    }
}
